#/bin/sh
jarfile=./org.eclipse.core.filesystem.linux.aarch64_1.4.200.v20220812-1420.jar
newjar=./org.eclipse.core.filesystem.linux.loongarch64_1.4.200.v20220812-1420.jar
mkdir -p temp && cd temp
jar xf ../$jarfile
cp -f ../org.eclipse.core.filesystem.linux.loongarch64/META-INF/MANIFEST.MF META-INF/
cp -f ../org.eclipse.core.filesystem.linux.loongarch64/fragment.properties ./
mkdir -p ./os/linux/loongarch64/
cp -f ../org.eclipse.core.filesystem.linux.loongarch64/os/linux/loongarch64/libunixfile_1_0_0.so ./os/linux/loongarch64/
rm META-INF/ECLIPSE_*
rm -rf ./os/linux/aarch64/*
jar cfm ../$newjar META-INF/MANIFEST.MF .
cd ../
rm -rf ./temp